
package com.xbongbong.pro.domain.dao;

import com.xbongbong.pro.domain.entity.ChartEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * @author autoGen
 * @date 2019-01-07 11:13:40
 */
@Repository
@Mapper
public interface ChartCustomDao {

    Integer insert(ChartEntity chart);

    Integer update(ChartEntity chart);

    void insertBatch(@Param("list") List<ChartEntity> chartList);

    Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

    ChartEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    List<ChartEntity> findEntitys(@Param("param") Map<String, Object> param);

    List<ChartEntity> findMutiEntitys(@Param("param") Map<String, Object> param);
    
    List<ChartEntity> findDiyEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    ChartEntity getSearch(@Param("corpid") String corpid, @Param("categoryId") Long categoryId, @Param("chartType") Integer chartType);
    /**
     * 批量更新
     * @author xingxing.xiao
     * @param param 参数
     */
    void batchUpdateEnable(@Param("param") Map<String, Object> param);

    void batchUpdateNumFormat(@Param("corpid") String corpid, @Param("idIn") List<Long> idIn, @Param("numFormat") Integer numFormat);

    List<ChartEntity> getStockChartList();

    List<ChartEntity> getReturnStockChartList();

    void updateBatch(@Param("list") List<ChartEntity> chartEntityList, @Param("corpid") String corpid);

    @Deprecated
    void updateBatchNoCorpId(@Param("list") List<ChartEntity> chartEntityList);


    void updateBatchAve(@Param("corpidIn") List<String> corpidIn);

    /**
     * 批量更新删除标识的值
     *
     * @param shouldDeleteIds
     * @param del
     */
    void updateBatchDeleteTag(@Param("shouldDeleteIds")List<Long> shouldDeleteIds, @Param("del")Integer del);
}
